package com.googlecode.lookie.platform.service;

public class DefaultPlatformServiceDescriptor
    implements PlatformServiceDescriptor
{

    private String serviceType;

    private Object service;

    public DefaultPlatformServiceDescriptor( String serviceType, Object service )
    {
        super();
        this.serviceType = serviceType;
        this.service = service;
    }

    public Class<?> getServiceType()
    {
        try
        {
            return Thread.currentThread().getContextClassLoader().loadClass( serviceType );
            //			return Class.forName(serviceType);
        }
        catch ( ClassNotFoundException e )
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

    public Object getService()
    {
        return service;
    }

}
